package com.cz.run.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.cz.run.beans.mysql.UserForce;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author CAIYJ
 * @since 2018-06-03
 */
@Repository
public interface UserForceDao extends BaseMapper<UserForce> {

    @Select("SELECT SUM(`force`) FROM user_force")
    double sumForce();

    @Select("SELECT MIN(`force`) FROM user_force;")
    double minForce();

    @Select("SELECT MAX(`force`) FROM user_force;")
    double maxForce();

    @Select("SELECT AVG(`force`) FROM user_force;")
    double avgForce();
}
